package com.shop.controller;


import com.shop.service.Sms_Sku_Ladder_Service;
import com.shop.utils.R;
import com.shop.utils.Sku_ManJian;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 商品阶梯价格
 * 满减活动  满几件打几折
 */
@RestController
@RequestMapping("/sku_ladder")
public class Sms_Sku_Ladder_Controller {

    @Autowired
    private Sms_Sku_Ladder_Service sms_sku_ladder_service;

    /**
     * 后台显示优惠活动  商品满减 和商品阶梯
     * @param sku_id
     * @return
     */
    @GetMapping("/find_admin_ManJian_All/{sku_id}")
    public Sku_ManJian find_admin_ManJian_All(@PathVariable("sku_id") Long sku_id){

        return sms_sku_ladder_service.find_admin_ManJian_All(sku_id);
    }

    /**
     * 后台修改关联商品的优惠卷满减信息  修改 满减优惠 和 商品阶梯价钱
     * @param sku_manJian
     * @return
     */
    @PutMapping("/up_admin_ManJian_All")
    public R up_admin_ManJian_All(Sku_ManJian sku_manJian){
        return sms_sku_ladder_service.up_admin_ManJian_All(sku_manJian);
    }



}
